<template>
  <div>
    gis地图
    <el-input v-model="FactoryId" placeholder="请输入id" size="normal" clearable></el-input>
    <el-button type="primary" size="default" @click="changeUrl">插入Id</el-button>
    <!-- <iframe src="http://22.46.9.81:7088/osp/GraphPub/Navigator.html" width="100%" height="600"></iframe> -->
    <iframe v-if="is_firstIframe" :src="iframeUrl" width="100%" height="600">
    </iframe>
    <iframe v-else :src="iframeUrl" width="100%" height="600">
    </iframe>
    01123201000041
  </div>
</template>

<script>

export default {
  data() {
    return {
      is_firstIframe: true,
      FactoryId: '',
      iframeUrl: '',
      FactoryId: "",
    }
  },
  methods: {
    changeUrl() {
      this.is_firstIframe = !this.is_firstIframe
      setTimeout(() => {
        let url = 'http://20.47.197.138:13500/#/apimap?factoryId='
        this.iframeUrl = url + this.FactoryId
        // this.$el.querySelector('iframe').src = this.iframeUrl;
        console.log(this.iframeUrl, '99999999999')
      }, 200);

    }
  }
}

</script>

<style lang="scss" scoped></style>